Image processing apparatus and image processing method

ABSTRACT

An image processing apparatus, includes: a transforming area setter, operable to set at least a part of an area of a target image as a transforming area; a transforming area divider, operable to arrange a plurality of dividing points in the transforming area and to divide the transforming area into a plurality of small areas by using a line connecting the dividing points; and a transforming processor, operable to move a position of at least one of the dividing points to transform at least one of the small areas, thereby transforming an image in the transforming area.

BACKGROUND

1. Technical Field

The present invention relates to an image processing technique fortransforming an image.

2. Related Art

There is a related-art image processing technique for transforming animage to be intended for a digital image (for example,JP-A-2004-318204). JP-A-2004-318204 has disclosed an image processing ofsetting a part of areas on an image of a face (an area representing animage of a cheek) as a correcting area, dividing the correcting areainto a plurality of small areas in accordance with a predeterminedpattern and enlarging or reducing an image in a magnification set everysmall area, thereby transforming a shape of the face.

In the related-art image processing for transforming an image, an imageis enlarged or reduced in a magnification set every small area. For thisreason, the processing is complicated. Moreover, the related-art imageprocessing for transforming an image is specialized for correcting aline of a cheek and copes with other various transforming manners withdifficulty.

SUMMARY

An advantage of some aspects of the invention is to provide a techniquecapable of easily and efficiently implementing an image processing fortransforming an image which corresponds to various transforming manners.

According to an aspect of the invention, there is provided an imageprocessing apparatus, comprising:

a transforming area setter, operable to set at least a part of an areaof a target image as a transforming area;

a transforming area divider, operable to arrange a plurality of dividingpoints in the transforming area and to divide the transforming area intoa plurality of small areas by using a line connecting the dividingpoints; and

a transforming processor, operable to move a position of at least one ofthe dividing points to transform at least one of the small areas,thereby transforming an image in the transforming area.

The present disclosure relates to the subject matter contained inJapanese patent application No. 2007-082325 filed on Mar. 27, 2007,which is expressly incorporated herein by reference in its entirety.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will be described with reference to the accompanyingdrawings, wherein like numbers reference like elements.

FIG. 1 is an explanatory diagram schematically showing a structure of aprinter to be an image processing apparatus according to a first exampleof the invention.

FIG. 2 is an explanatory view showing an example of a user interfaceincluding a list display of an image.

FIG. 3 is a flowchart showing a flow of a face shape correction printprocessing to be carried out by the printer according to the example.

FIG. 4 is a flowchart showing a flow of a face shape correctionprocessing according to the example.

FIG. 5 is an explanatory view showing an example of a user interface forsetting a type and a degree of an image transformation.

FIG. 6 is an explanatory view showing an example of a result ofdetection of a face area.

FIG. 7 is a flowchart showing a flow of a positioning processing in avertical direction of the face area according to the example.

FIG. 8 is an explanatory view showing an example of a specific area.

FIG. 9 is an explanatory view showing an example of a method ofcalculating an evaluation value.

FIGS. 10A and 10B are explanatory views showing an example of a methodof selecting an evaluating target pixel.

FIG. 11 is an explanatory view showing an example of a method ofdetermining a height reference point.

FIG. 12 is an explanatory view showing an example of a method ofcalculating an approximate tilt angle.

FIG. 13 is an explanatory view showing an example of a positioningmethod in the vertical direction of the face area.

FIG. 14 is a flowchart showing a flow of a processing of regulating atilt of the face area according to the example.

FIG. 15 is an explanatory view showing an example of a method ofcalculating an evaluation value to regulate the tilt of the face area.

FIG. 16 is an explanatory chart showing an example of a result ofcalculation of a variance of the evaluation value with respect to eachevaluating direction.

FIG. 17 is an explanatory view showing an example of a method ofregulating the tilt of the face area.

FIG. 18 is an explanatory view showing an example of a method of settinga transforming area.

FIG. 19 is an explanatory view showing an example of a method ofdividing the transforming area into small areas.

FIG. 20 is an explanatory diagram showing an example of contents of adividing point movement table.

FIG. 21 is an explanatory view showing an example of a movement in aposition of a dividing point in accordance with the dividing pointmovement table.

FIG. 22 is an explanatory view showing a concept of a method oftransforming an image through a transforming portion.

FIG. 23 is an explanatory view showing a concept, of the method oftransforming an image in a triangular area.

FIG. 24 is an explanatory view showing a face shape correcting manneraccording to the example.

FIG. 25 is an explanatory view showing an example of a state of adisplay portion on which a target image obtained after the face shapecorrection is displayed.

FIG. 26 is a flowchart showing a flow of a corrected image printprocessing according to the example.

FIG. 27 is an explanatory diagram showing another example of thecontents of the dividing point movement table.

FIG. 28 is an explanatory view showing an example of another method ofarranging the dividing point.

FIG. 29 is an explanatory diagram showing a further example of thecontents of the dividing point movement table.

FIG. 30 is an explanatory view showing an example of a user interfacefor designating a moving manner of the dividing point through a user.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

Next, an embodiment according to the invention will be described in thefollowing order based on examples.

A. First Example:

A-1. Structure of Image Processing Apparatus:

A-2. Face Shape Correction Print Processing:

A-3. Variant of First Example:

B. Other Variants:

A. First Example A-1. Structure of Image Processing Apparatus

FIG. 1 is an explanatory diagram schematically showing a structure of aprinter 100 to be an image processing apparatus according to a firstexample of the invention. The printer 100 according to the example is acolor ink jet printer corresponding to a so-called direct print whichserves to print an image based on image data acquired from a memory cardMC. The printer 100 comprises a CPU 110 for controlling each portion ofthe printer 100, an internal memory 120 constituted by an ROM or an RAM,for example, an operating portion 140 constituted by a button or a touchpanel, a display portion 150 constituted by a liquid crystal display, aprinter engine 160, and a car interface (a card I/F) 170. The printer100 may further comprise an interface for carrying out a datacommunication with another apparatus (for example, a digital stillcamera). Respective components of the printer 100 are connected to eachother through a bus.

The printer engine 160 is a printing mechanism for carrying out a printbased on print data. The card interface 170 serves to transfer datatogether with a memory card MC inserted into a card slot 172. In theexample, image data to be RGB data are stored in the memory card MC andthe printer 100 acquires the image data stored in the memory card MCthrough the card interface 170.

A face shape correcting portion 200, a displaying portion 310 and aprinting portion 320 are stored in the internal memory 120. The faceshape correcting portion 200 is a computer program for executing a faceshape correction processing which will be described below under apredetermined operating system. The displaying portion 310 is a displaydriver for controlling the display portion 150 to display a processingmenu or a message on the display portion 150. The printing portion 320is a computer program for generating print data from image data andcontrolling the printer engine 160 to execute a print of an image basedon the print data. The CPU 110 reads and executes the programs from theinternal memory 120, thereby implementing a function of each of theportions.

The face shape correcting portion 200 includes, as a program module, atransforming manner setting portion 210, a face area detecting portion220, a face area regulating portion 230, a transforming area settingportion 240, a transforming area dividing portion 250 and a transformingportion 260. The transforming manner setting portion 210 includes adesignation acquiring portion 212, and the face area regulating portion230 includes a specific area setting portion 232, an evaluating port ion234 and a determining portion 236. A function of each of the portionswill be explained in detail in the following description of a face shapecorrection print processing.

A dividing point arranging pattern table 410 and a dividing pointmovement table 420 are also stored in the internal memory 120. Thecontents of the dividing point arranging pattern table 410 and thedividing point movement table 420 will be explained in detail in thefollowing description of the face shape correction print processing.

A-2. Face Shape Correction Print Processing

The printer 100 serves to print an image based on the image data storedin the memory card MC. When the memory card MC is inserted into the cardslot 172, a user interface including a list display of an image storedin the memory card MC is displayed on the display portion 150 throughthe displaying portion 310. FIG. 2 is an explanatory view showing anexample of the user interface including the list display of the image.In the example, the list display of the image is implemented by using athumbnail image included in the image data (image file) stored in thememory card MC.

When an image (or a plurality of images) is selected and a normal printbutton is selected by a user in the user interface shown in FIG. 2, theprinter 100 according to the example executes a normal print processingof normally printing the selected image. On the other hand, when animage (a plurality of images) is selected and a face shape correctionprint button is selected by the user in the user interface, the printer100 executes a face shape correction print processing of correcting ashape of a face in an image and printing an image obtained after thecorrection for the selected image.

FIG. 3 is a flowchart showing a flow of the face shape correction printprocessing to be carried out through the printer 100 according to theexample. At Step S100, the face shape correcting portion 200 (FIG. 1)executes a face shape correction processing. The face shape correctionprocessing according to the example serves to correct a shape of atleast a part of the face (for example, a shape of a contour of the faceor a shape of an eye) in the image.

FIG. 4 is a flowchart showing a flow of the face shape correctionprocessing according to the example. At Step S110, the face shapecorrecting portion 200 (FIG. 1) sets a target image TI which is intendedfor the face shape correction processing. The face shape correctingportion 200 sets, as the target image TI, the image selected by the userin the user interface shown in FIG. 2. The image data of the targetimage TI thus set are acquired by the printer 100 from the memory cardMC through the card interface 170 and are stored in a predetermined areaof the internal memory 120.

At Step S120 (FIG. 4), the transforming manner setting portion 210(FIG. 1) sets an image transforming type and an image transformingdegree for correcting a face shape. The transforming manner settingportion 210 gives the displaying portion 310 an instruction fordisplaying, on the display portion 150, a user interface for setting theimage transforming type and degree, and selects the image transformingtype and degree designated by the user through the user interface andsets them as an image transforming type and degree to be used for theprocessing.

FIG. 5 is an explanatory view showing an example of the user interfacefor setting the image transforming type and degree. As shown in FIG. 5,the user interface includes an interface for setting the imagetransforming type. In the example, for instance, it is assumed that atransforming type “type A” for causing the shape of the face to be sharpand a transforming type “type B” for enlarging a shape of an eye arepreset as choices. The user designates the image transforming typethrough the interface. The transforming manner setting portion 210 setsthe image transforming type designated by the user as an imagetransforming type to be used for an actual processing.

Moreover, the user interface shown in FIG. 5 includes an interface forsetting the image transforming degree (extent). As shown in FIG. 5, inthe example, it is assumed that three stages of strong (S), middle (M)and weak (W) are preset as choices for the image transforming degree.The user designates the image transforming degree through the interface.The transforming manner setting portion 210 sets the image transformingdegree designated by the user as the image transforming degree to beused in the actual processing.

In the example, it is possible to designate the details of thetransforming manner through the user as will be described below. In thecase in which a check box having a purport that a request fordesignating the details is given is checked by the user in the userinterface shown in FIG. 5, the details of the transforming manner aredesignated by the user as will be described below.

Subsequently, description will be given on the assumption that thetransforming type “type A” for causing the shape of the face to be sharpis set as the image transforming type and the degree of the extent“middle” is set as the image transforming degree, and the request fordesignating the details is not given by the use.

At Step S130 (FIG. 4), the face area detecting portion 220 (FIG. 1)detects the face area FA in the target image TI. The face area FAimplies an image area provided on the target image TI which includes animage of at least a part of the face. The detection of the face area FAthrough the face area detecting portion 220 is executed by using awell-known face detecting method, for example, a pattern matching methodutilizing a template (see JP-A-2004-318204).

FIG. 6 is an explanatory view showing an example of a result of thedetection of the face area FA. As shown in FIG. 6, according to a facedetecting method used in the example, a rectangular area includingimages of an eye, a nose and a mouth on the target image TI is detectedas the face area FA. A reference line RL shown in FIG. 6 defines avertical direction (a perpendicular direction) of the face area FA andindicates a center in a transverse direction (a lateral direction) ofthe face area FA. More specifically, the reference line RL is a straightline which passes through a center of gravity of the rectangular facearea FA and is parallel with a boundary line provided in the verticaldirection (the perpendicular direction) of the face area FA.

In the detection of the face area FA at the Step S130, if the face areaFA is not detected, a notice of the purport is given to the user throughthe display portion 150. In this case, a normal print having no faceshape correction may be carried out or a processing of detecting theface area FA again using another face detecting method may be carriedout.

In general, a well-known face detecting method such as a patternmatching method utilizing a template does not serve to detect a positionand a tilt (an angle) for a whole face or a face portion (an eye or amouse) in detail but to set, as the face area FA, an area supposed toinclude an image of the face from the target image TI on the whole. Onthe other hand, as will be described below, the printer 100 according tothe example sets an area over which the image transformation processingfor correcting the shape of the face is carried out based on the facearea FA which is detected (a transforming area TA which will bedescribed below). In general, the image of the face has a high degree ofattention of an observer. Depending on a relationship of a position andan angle between the transforming area TA which is set and the image ofthe face, therefore, there is a possibility that an image obtained aftercorrecting the shape of the face might be unnatural. In the example,therefore, it is assumed that positioning and a tilt regulation whichwill be described below are carried out for the face area FA detected atthe Step S130 in such a manner that a more natural and preferable faceshape correction can be implemented.

At Step S140 (FIG. 4), the face area regulating portion 230 (FIG. 1)carries out positioning in the vertical direction of the face area FAdetected at the Step S130. The positioning in the vertical direction ofthe face area FA implies that a position placed along the reference lineRL of the face area FA (see FIG. 6) is adjusted and the face area FA inthe target image TI is reset.

FIG. 7 is a flowchart showing a flow of the positioning processing inthe vertical direction of the face area FA according to the example. AtStep S141, the specific area setting portion 232 (FIG. 1) sets aspecific area SA. The specific area SA is provided on the target imageTI and includes an image of a predetermined reference object to bereferred to when the positioning in the vertical direction of the facearea FA is to be executed. In the example, the reference object is setto be an “eye” and the specific area SA is set to be an area includingan image of the “eye”.

FIG. 8 is an explanatory view showing an example of the specific areaSA. In the example, the specific area setting portion 232 sets thespecific area SA based on a relationship with the face area FA. Morespecifically, an area having a size obtained by reducing (or increasing)a size of the face area FA in a predetermined ratio in an orthogonaldirection to the reference line RL and a parallel direction with thereference line RL and having a predetermined positional relationshipwith the position of the face area FA is set to be the specific area SA.More specifically, in the example, if the specific area SA is set basedon the relationship with the face area FA detected by the face areadetecting portion 220, the predetermined ratio and the predeterminedpositional relationship are preset in such a manner that the specificarea SA includes images of both eyes. It is preferable that the specificarea SA should be set to be a small possible area as long as the imagesof both eyes are included in such a manner that an image which is almostindistinguishable from the image of the eye (for example, an image of ahair) can be prevented from being included as greatly as possible.

As shown in FIG. 8, moreover, the specific area SA is set to be arectangular area which is symmetrical with respect to the reference lineRL. The specific area SA is divided into an area on a left side(hereinafter referred to as a “left divided specific area SA(l)”) and anarea on a right side (hereinafter referred to as a “right dividedspecific area as SA(r)”) through the reference line RL. The specificarea SA is set in such a manner that an image of one of the eyes isincluded in each of the left divided specific area SA(l) and the rightdivided specific area SA (r).

At Step S142 (FIG. 7), the evaluating portion 234 (FIG. 1) calculates anevaluation value for detecting a position of the image of the eye in thespecific area SA. FIG. 9 is an explanatory view showing an example of amethod of calculating the evaluation value. In the example, an R value(an R component value) of each pixel of the target image TI to be RGBimage data is used for calculating the evaluation value. The reason isas follows. More specifically, it is supposed that the R value has agreat difference between an image of a skin portion and an image of aneye portion and precision in detection of the image of the eye can bethus enhanced by using the R value for calculating the evaluation value.In the example, moreover, data on the target image TI are acquired asthe RGB data. By using the R value for calculating the evaluation value,therefore, it is possible to enhance an efficiency of the calculation ofthe evaluation value. As shown in FIG. 9, the calculation of theevaluation value is individually carried out for each of the two dividedspecific areas (the right divided specific area SA(r) and the leftdivided specific area SA(l))”.

As shown in FIG. 9, the evaluating portion 234 sets n straight lines(hereinafter referred to as “target pixel specifying lines PL1 to PLn”)which are orthogonal to the reference line RL in the divided specificareas (the right divided specific area SA(r) and the left dividedspecific area SA(l)). The target pixel specifying lines PL1 to PLn arestraight lines which divide a height of the divided specific area (asize along the reference line RL) into (n+1) equal parts. In otherwords, the target pixel specifying lines PL are provided at an equalinterval s.

The evaluating portion 234 selects a pixel to be used in the calculationof the evaluation value (which will be hereinafter referred to as an“evaluating target pixel TP”) from pixels constituting the target imageTI for each of the target pixel specifying lines PL1 to PLn. FIGS. 10Aand 10B are explanatory views showing an example of a method ofselecting the evaluation target pixel TP. The evaluating portion 234selects, as the evaluating target pixel TP, a pixel overlapping with thetarget pixel specifying line PL from the pixels constituting the targetpixel TI. FIG. 10A shows the case in which the target pixel specifyingline PL is parallel with a row direction of the pixels of the targetpixel TI (an X direction in FIGS. 10A and 10B). In this case, pixels ona pixel row overlapping with each of the target pixel specifying linesPL (pixels having a mark of ◯ in FIG. 10A) is selected as the evaluatingtarget pixel TP for each of the target pixel specifying lines PL.

On the other hand, depending on the method of detecting the face area FAand the method of setting the specific area SA, the target pixelspecifying line PL is not parallel with the row direction (X direction)of the pixel in the target pixel TI in some cases as shown in FIG. 10B.Also in these cases, the pixel overlapping with each of the target pixelspecifying lines PL is selected as the evaluating target pixel TP foreach of the target pixel specifying lines PL in principle. In the casein which one of the target pixel specifying lines PL overlaps with twopixels which are positioned in an identical column of a pixel matrix ofthe target image TI (that is, which have an identical Y coordinate) asin a relationship between the target pixel specifying line PL1 andpixels PXa and PXb in FIG. 10B, for example, a pixel having a shorterdistance of an overlapping portion (for example, the pixel PXb) isexcluded from the evaluating target pixel TP. More specifically, onlyone pixel is selected as the evaluating target pixel TP from one ofcolumns of the pixel matrix for each of the target pixel specifyinglines PL.

In the case in which a tilt of the target pixel specifying line PLexceeds 45 degrees with respect to the X direction, a relationshipbetween the column and the row in the pixel matrix is reversed in thedescription so that only one of the pixels is selected as the evaluatingtarget pixel TP from one of the rows in the pixel matrix. In some cases,moreover, one of the pixels is selected as the evaluating target pixelTP for a plurality of target pixel specifying lines PL depending on arelationship between the sizes of the target image TI and the specificarea SA.

The evaluating portion 234 calculates, as the evaluation value, a meanvalue of the R value of the evaluating target pixel TP for each of thetarget pixel specifying lines PL. In the example, it is assumed that apart of the pixels having great R values in the evaluating target pixelsTP which are selected are excluded from the calculating targets of theevaluation value for each of the target pixel specifying lines PL. Morespecifically, in the case in which k evaluating target pixels TP areselected for any of the target pixel specifying lines PL, for example,the evaluating target pixels TP are divided into two groups including afirst group constituted by 0.75 k pixels having comparatively great Rvalues and a second group constituted by 0.25 k pixels havingcomparatively small R values and only the pixels belonging to the secondgroup are calculating targets of the mean value of the R value to be theevaluation value. The reason why a part of the evaluating target pixelsTP is thus excluded from the calculating target of the evaluation valuewill be described below.

As described above, in the example, the evaluation value is calculatedfor each of the target pixel specifying lines PL through the evaluatingportion 234. The target pixel specifying line PL is the straight linewhich is orthogonal to the reference line RL. Therefore, the evaluationvalue can be expressed to be calculated for a plurality of positions(evaluating positions) provided along the reference line RL. Moreover,the evaluation value can be represented as a value indicative of afeature of a distribution of pixel values in the orthogonal direction tothe reference line RL for each of the evaluating positions.

At Step S143 (FIG. 7), the determining portion 236 (FIG. 1) detects theposition of the eye in the specific area SA and determines a heightreference point Rh based on a result of the detection. First of all, thedetermining portion 236 creates a curve representing a distribution ofthe evaluation value (the mean value of the R value) along the referenceline RL and detects, as an eye position Eh, a position placed in thedirection of the reference line RL in which the evaluation value takes aminimal value for each of the dividing specific areas as shown on aright side of FIG. 9. The eye position Eh in the left divided specificarea SA(l) is represented as Eh(l) and the eye position Eh in the rightdivided specific area SA(r) is represented as Eh(r).

In case of Mongoloid, it can be supposed that a portion representing animage of a skin in the divided specific area has a great R value, whilea portion representing an image of an eye (in more detail, a blackportion provided on a center of the eye) has a small R value. Asdescribed above, therefore, it is possible to decide, as the eyeposition Eh, the position placed along the reference line RL in whichthe evaluation value (the mean value of the R value) takes a minimalvalue.

As shown in FIG. 9, the divided specific area includes another imagehaving a small R value (for example, an image of an eyebrow or a hair)is addition to the image of the eye in some cases. For this reason, inthe case in which the curve representing the distribution of theevaluation value along the reference line RL takes a plurality ofminimal values, the determining portion 236 decides that any of thepositions taking the minimal values which is placed on a lowermost sideis the eye position Eh. In general, it can be supposed that an imagehaving a small R value such as the eyebrow or the hair is oftenpositioned on an upper side of the image of the eye and is rarelypositioned on a lower side of the image of the eye. For this reason, itis possible to make the decision.

Even if the curve is placed on a lower side of the position of the imageof the eye (a position which mainly corresponds to an image of a skin),moreover, there is a possibility that the curve might take a greatevaluation value and a minimal value. For this reason, any of theminimal values which is greater than a predetermined threshold may bedisregarded. Alternatively, a position of the target pixel specifyingline PL corresponding to a minimum value in an evaluation valuecalculated for each of the target pixel specifying lines PL may besimply set to be the eye position Eh.

In the example, the eye (the black portion provided on the center of theeye) to be a portion which is supposed to have a comparatively greatdifference in a color from surroundings in the face is used as thereference object for positioning the face area FA. However, the meanvalue of the R value to be the evaluation value is calculated bysetting, as a target, the evaluating target pixels TP on the targetpixel specifying line PL. For example, therefore, there is a possibilitythat precision in the detection of the black portion might be reduced bythe influence of an image of a white portion provided on a peripheraledge of the black portion. In the example, as described above, a part ofthe evaluating target pixels TP supposed to have the great difference ina color from the reference object (for example, the pixel belonging tothe first group and having the comparatively great R value) is excludedfrom the calculating target of the evaluation value to enhance precisionin the detection of the reference object.

Next, the determining portion 236 determines the height reference pointRh based on the eye position Eh which is detected. FIG. 11 is anexplanatory view showing an example of a method of determining theheight reference point Rh. The height reference point Rh is used as areference in the positioning in the vertical direction of the face areaFA. In the example, as shown in FIG. 11, a point on the reference lineRL which is positioned in the middle of the two left and right eyepositions Eh(l) and Eh(r) is set to be the height reference point Rh.More specifically, a middle point of an intersection of a straight lineEhL(l) indicative of the left eye position Eh(l) and the reference lineRL and an intersection of a straight line EhL(r) indicative of the righteye position Eh (r) and the reference line RL is set to be the highreference point Rh.

In the example, the determining portion 236 serves to calculate anapproximate tilt angle of the face image (which will be hereinafterreferred to as an “approximate tilt angle RI”) based on the eye positionEh which is detected. The approximate tilt angle RI of the face image isobtained by estimating an approximate tilt of the image of the face inthe target image TI with respect to the reference line RL of the facearea FA. FIG. 12 is an explanatory view showing an example of a methodof calculating the approximate tilt angle RI. As shown in FIG. 12, firstof all, the determining portion 236 determines an intersection IP(l) ofa straight line for dividing a width Ws(l) of the left divided specificarea SA(l) into halves and the straight line EhL(l) and an intersectionIP(r) of a straight line for dividing a width Ws (r) of the rightdivided specific area SA(r) into halves and the straight line EhL(r).Then, an angle formed by a straight line IL which is orthogonal to astraight line for connecting the intersection IP(l) and the intersectionIP(r) and the reference line RL is calculated as the approximate tiltangle RI.

At Step S144 (FIG. 7), the face area regulating portion 230 (FIG. 1)carries out the positioning in the vertical direction of the face areaFA. FIG. 13 is an explanatory view showing an example of a method ofcarrying out the positioning in the vertical direction of the face areaFA. The positioning in the vertical direction of the face area FA iscarried out by resetting the face area FA in such a manner that theheight reference point Rh is placed in a predetermined position in theface area FA obtained after the positioning. More specifically, as shownin FIG. 13, the face area FA is vertically positioned along thereference line RL in such a manner that the height reference point Rh isplaced in a position to divide a height Hf of the face area FA at apredetermined ratio of r1 to r2. In the example of FIG. 13, the facearea FA shown in a broken line which has not been subjected to thepositioning is moved in an upper direction so that the face area FAshown in a solid line which is obtained after the positioning is reset.

After the positioning of the face area FA, at Step S150 (FIG. 4), theface area regulating portion 230 (FIG. 1) regulates the tilt (the angle)of the face area FA. The regulation of the tilt of the face area FAimplies that the tilt of the face area FA in the target image TI isregulated to be adapted to the tilt of the image of the face and theface area FA is thus reset. In the example, a predetermined referenceobject to be referred to in the execution of the regulation of the tiltof the face area FA is set to be “both eyes”. In the regulation of thetilt of the face area FA according to the example, a plurality ofevaluating directions representing choices of a tilt regulating angle isset and an evaluating specific area ESA corresponding to each of theevaluating directions is set as an area including images of both eyes.The evaluation value is calculated based on a pixel value of an image ofthe evaluating specific area ESA for each of the evaluating directionsand the tilt of the face area FA is regulated by using the tiltregulating angle determined based on the evaluation value.

FIG. 14 is a flowchart showing a flow of a processing of regulating thetilt of the face area FA according to the example. Moreover, FIG. 15 isan explanatory view showing an example of a method of calculating anevaluation value for regulating the tilt of the face area FA. At StepS151 (FIG. 14), the specific area setting portion 232 (FIG. 1) sets aninitial evaluating specific area ESA(0). The initial evaluating specificarea ESA(0) is the estimating specific area ESA corresponding to aparallel direction (hereinafter referred to as an “initial evaluatingdirection”) with the reference line RL obtained after the positioning ofthe face area FA (see FIG. 13). In the example, the specific area SAcorresponding to the face area FA obtained after the positioning (seeFIG. 13) is exactly set as the initial evaluating specific area ESA(0).The evaluating specific area ESA obtained after regulating the tilt ofthe face area FA is not divided into two left and right areasdifferently from the specific area SA in the positioning of the facearea FA. The set initial evaluating specific area ESA(0) is shown in anuppermost stage of FIG. 15.

At Step S152 (FIG. 14), the specific area setting portion 232 (FIG. 1)sets a plurality of evaluating directions and the evaluating specificarea ESA corresponding to each of the evaluating directions. Theevaluating directions are set as a direction representing choices of thetilt regulating angle. In the example, a plurality of evaluatingdirection lines EL having an angle formed with respect to the referenceline RL within a predetermined range is set and a parallel directionwith the evaluating direction line EL is set to be the evaluatingdirection. As shown in FIG. 15, a straight line determined by rotatingthe reference line RL every predetermined angle α counterclockwise andclockwise around a central point (a center of gravity) CP of the initialevaluating specific area ESA(0) is set to be the evaluating directionlines EL. The evaluating direction line EL having an angle of φ degreesformed with respect to the reference line RL is represented as EL(φ).

In the example, a predetermined range for the angle formed by each ofthe evaluating direction lines EL and the reference line RL is set to be−±20 degrees. In the specification, a rotating angle at which thereference line RL is rotated clockwise is expressed in a positive valueand a rotating angle at which the reference line RL is rotatedcounterclockwise is expressed in a negative value. The specific areasetting portion 232 rotates the reference line RL counterclockwise andclockwise while increasing the rotating angle within such a range as notto exceed 20 degrees, for example, α degrees, 2α degrees . . . , andsets the evaluating direction lines EL. FIG. 15 shows the evaluatingdirection line EL (EL(−α), EL (−2α), EL(α)) determined through therotation of the reference line RL by −α degrees, −2α degrees and adegrees, respectively. The reference line RL can also be represented asan evaluating direction line EL(0).

The evaluating specific area ESA corresponding to the evaluatingdirection line EL representing each of the evaluating directions isobtained by rotating the initial evaluating specific area ESA(0) aroundthe central point CP at an equal angle to a rotating angle in theoperation for setting the evaluating direction line EL. The evaluatingspecific area ESA corresponding to the evaluating direction line EL(φ)is represented as an evaluating specific area ESA(φ). FIG. 15 showsevaluating specific areas ESA (ESA(−α), ESA(−2α), ESA(α)) correspondingto the evaluating direction lines EL(−α), EL(−2α) and EL(α),respectively. It is assumed that the initial evaluating specific areaESA(0) is also treated as one of the evaluating specific areas ESA.

At Step S153 (FIG. 14), the evaluating portion 234 (FIG. 1) calculatesthe evaluation value based on the pixel value of the image of theevaluating specific area ESA in each of the evaluating directions whichare set. In the example, the mean value of the R value is used as anevaluation value in the regulation of the tilt of the face area FA inthe same manner as the evaluation value in the positioning of the facearea FA. The evaluating portion 234 calculates the evaluation values fora plurality of evaluating positions in the evaluating direction.

A method of calculating the evaluation value is the same as the methodof calculating the evaluation value in the positioning of the face areaFA. More specifically, as shown in FIG. 15, the evaluating portion 234sets the target pixel specifying lines PL1 to PLn which are orthogonalto the evaluating direction line EL in the respective evaluatingspecific areas ESA and selects the evaluating target pixel TP for eachof the target pixel specifying lines PL1 to PLn, and calculates, as theevaluation value, the mean value of the R value of the evaluating targetpixel TP thus selected.

A method of setting the target pixel specifying line PL and a method ofselecting the evaluating target pixel TP in the evaluating specific areaESA have a difference as to whether they transversely divide the areabut are the same as the method of positioning the face area FA shown inFIGS. 9 and 10. In the same manner as in the positioning of the facearea FA, a part of the evaluating target pixels TP which are selected(for example, 0.75 k pixels having comparatively great R values in kevaluating target pixels TP) may be excluded from the calculating targetof the evaluation value. A distribution along the evaluating directionline EL of the calculated evaluation value for each of the evaluatingdirections is shown on a right side of FIG. 15.

The target pixel specifying line FL is the straight line which isorthogonal to the evaluating direction line EL. Therefore, theevaluation value can be expressed to be calculated for a plurality ofpositions (evaluating positions) placed along the evaluating directionline EL. Moreover, the evaluation value can be expressed as a valuerepresenting a feature of a distribution of a pixel value in anorthogonal direction to the evaluating direction line EL for each of theevaluating positions.

At Step S154 (FIG. 14), the determining portion 236 (FIG. 1) determinesa regulating angle to be used for regulating the tilt of the face areaFA. The determining portion 236 calculates a variance along theevaluating direction line EL of the evaluation value calculated at theStep S153 for each of the evaluating directions and selects any of theevaluating directions in which a value of the variance is maximized. Anangle formed by the evaluating direction line EL corresponding to theevaluating direction thus selected and the reference line RL isdetermined as the regulating angle to be used for regulating the tilt.

FIG. 16 is an explanatory chart showing an example of a result obtainedby calculating the variance of the evaluation value for each of theevaluating directions. In the example of FIG. 16, the variance takes amaximum value Vivax in the evaluating direction in which the rotatingangle is −α degrees. Accordingly, the rotating angle of −α degrees, thatis, a degrees in a counterclockwise direction is determined as theregulating angle to be used for regulating the tilt of the face area FA.

Description will be given to the reason why the angle corresponding tothe evaluating direction in which the value of the variance of theevaluation value is the maximum is determined as the regulating angle tobe used for regulating the tilt. As shown in a second stage from a topin FIG. 15, images of central parts (black portions) of left and righteyes are arranged in an almost parallel direction with the target imagespecifying line PL (that is, an orthogonal direction to the evaluatingdirection line EL) in the evaluating specific area ESA(−α) at therotating angle of −α degrees. At this time, images of left and righteyebrows are also arranged in almost the orthogonal direction to theevaluating direction line EL. Accordingly, it can be supposed that theevaluating direction corresponding to the evaluating direction line ELalmost represents the tilt of the image of the face. In this case, as apositional relationship between the image of the eye or eyebrow having agenerally small R value and an image of a skin portion having agenerally great R value, their overlapping portion is small in thedirection of the target pixel specifying line PL. For this reason, theevaluation value in the position of the image of the eye or the eyebrowis comparatively small and the evaluation value in the position of theimage of the skin portion is comparatively great. Accordingly, thedistribution of the evaluation value along the evaluating direction lineEL has a comparatively large variation (a high amplitude) as shown inFIG. 15, and the value of the variance is thus increased.

On the other hand, as shown in uppermost, third and fourth stages inFIG. 15, in the evaluating specific areas ESA(0), ESA (−2α) and ESA(α)in the case in which the rotating angle is zero degree, −2α degrees andα degrees, the images of the central parts of the left and right eyesand the left and right eyebrows are not arranged in the orthogonaldirection to the evaluating direction line EL but are shifted.Accordingly, an evaluating direction corresponding to the evaluatingdirection line EL does not represent the tilt of the image of the face.At this time, as the positional relationship between the image of theeye or the eyebrow and that of the skin portion, their overlappingportion is large in the direction of the target pixel specifying linePL. For this reason, the distribution of the evaluation value along theevaluating direction line EL has a comparatively small variation (a lowamplitude) as shown in FIG. 15, and the value of the variance is thusreduced.

As described above, the value of the variance of the evaluation valuealong the evaluating direction line EL is increased when the evaluatingdirection is close to the direction of the tilt of the image of theface, and is reduced when the evaluating direction is distant from thedirection of the tilt of the image of the face. By determining, as aregulating angle to be used for the tilt regulation, an anglecorresponding to the evaluating direction in the case in which the valueof the variance of the evaluation value is a maximum, accordingly, it ispossible to implement the regulation of the tilt of the face area FA insuch a manner that the tilt of the face area FA is adapted to the tiltof the image of the face.

In the example, in the case in which a maximum value is taken with acritical value in a range of an angle, that is, at −20 or 20 degrees asa result obtained by calculating the variance of the evaluation value,it can be supposed that there is a high possibility that the tilt of theface might not be evaluated accurately. For this reason, it is assumedthat the tilt of the face area FA is not regulated.

In the example, moreover, the determined regulating angle is comparedwith the approximate tilt angle RI calculated in the positioning of theface area FA. In the case in which a difference between the regulatingangle and the approximate tilt angle RI is greater than a predeterminedthreshold, it can be supposed that some error is made in the evaluationor determination in the positioning and tilt regulation of the face areaFA. For this reason, it is assumed that the positioning and tiltregulation of the face area FA is not carried out.

At Step S155 (FIG. 14), the face area regulating portion 230 (FIG. 1)regulates the tilt of the face area FA. FIG. 17 is an explanatory viewshowing an example of a method of regulating the tilt of the face areaFA. The tilt of the face area FA is regulated by rotating the face areaFA around the central point CP of the initial evaluating specific areaESA(0) by the regulating angle determined at the Step S154. In theexample of FIG. 17, the face area FA which has not been regulated asshown in a broken line is rotated counterclockwise by a degrees so thatthe face area FA which has been regulated as shown in a solid line isset.

At Step S160 (FIG. 4) to be carried out after the regulation of the tiltof the face area FA is ended, the transforming area setting portion 240(FIG. 1) sets the transforming area TA. The transforming area TA isprovided on the target image TI and is intended for an imagetransformation processing for correcting the face shape. FIG. 18 is anexplanatory view showing an example of a method of setting thetransforming area TA. As shown in FIG. 18, in the example, thetransforming area TA is set as an area obtained by extending (orshortening) the face area FA in a parallel direction with the referenceline RL (a vertical direction) and an orthogonal direction to thereference line RL (a transverse direction) More specifically, if a sizein the vertical direction of the face area FA is represented as Hf and asize in the transverse direction is represented as Wf, the face area FAis extended by k1·Hf in an upper direction and k2·Hf in a lowerdirection and an area extended by k3·Wf in leftward and rightwarddirections respectively is set to be the transforming area TA. k1, k2and k3 denote predetermined coefficients.

When the transforming area TA is set, thus, the reference line RL to bea parallel straight line with a contour line in the vertical directionof the face area FA is also a straight line which is parallel with acontour line in the vertical direction of the transforming area TA.Moreover, the reference line RL is a straight line for dividing a widthof the transforming area TA into halves.

As shown in FIG. 18, the transforming area TA is set to be an area whichalmost includes images from a chin to a forehead in the verticaldirection and includes images of left and right cheeks in the transversedirection. More specifically, in the example, the coefficients k1, k2and k3 are preset based on a relationship with the size of the face areaFA in such a manner that the transforming area TA almost includes theimages within the range.

At Step S170 (FIG. 4), the transforming area dividing portion 250(FIG. 1) divides the transforming area TA into a plurality of smallareas. FIG. 19 is an explanatory view showing an example of a method ofdividing the transforming area TA into small areas. The transformingarea dividing portion 250 arranges a plurality of dividing points D inthe transforming area TA and divides the transforming area TA into aplurality of small areas by using a straight line for connecting thedividing points D.

A manner for arranging the dividing points D (the number and positionsof the dividing points D) is defined corresponding to the transformingtype set at the Step S120 (FIG. 4) through the dividing point arrangingpattern table 410 (FIG. 1). The transforming area dividing portion 250refers to the dividing point arranging pattern table 410 to arrange thedividing point D in a corresponding manner to the transforming type setat the Step S120. In the example, as described above, the transforming“type A” for causing the face to be sharp (see FIG. 5) is set as thetransforming type. Therefore, the dividing point D is arranged in acorresponding manner to the transforming type.

As shown in FIG. 19, the dividing point D is arranged on an intersectionof a horizontal dividing line Lh and a vertical dividing line Lv and anintersection of the horizontal dividing line Lh and vertical dividingline Lv and an outer frame of the transforming area TA. The horizontaldividing line Lh and the vertical dividing line Lv serve as a referencefor arranging the dividing point D in the transforming area TA. As shownin FIG. 19, two horizontal dividing lines Lh which are orthogonal to thereference line RL and four vertical dividing lines Lv which are parallelwith the reference line RL are set in the arrangement of the dividingpoint D corresponding to the transforming type for causing the face tobe sharp. The two horizontal dividing lines Lh are referred to as Lh1and Lh2 in order from a bottom of the transforming area TA. Moreover,the four vertical dividing lines Lv are referred to as Lv1, Lv2, Lv3 andLv4 in order from a left of the transforming area TA.

The horizontal dividing line Lh1 is disposed below the image of the chinin the transforming area TA and the horizontal dividing line Lh2 isdisposed in the vicinity of a just lower part of the image of the eye.Moreover, the vertical dividing lines Lv1 and Lv4 are disposed on anoutside of the image of the line of the cheek, and the vertical dividinglines Lv2 and Lv3 are disposed on an outside of an image of a corner ofthe eye. The horizontal dividing line Lh and the vertical dividing lineLv are disposed in accordance with a corresponding relationship with thepreset size of the transforming area TA in such a manner that thepositional relationship between the images of the horizontal dividingline Lh and the vertical dividing line Lv is consequently obtained asdescribed above.

In accordance with the arrangement of the horizontal dividing line Lhand the vertical dividing line Lv, the dividing point D is disposed onthe intersection of the horizontal dividing line Lh and the verticaldividing line Lv and the intersection of the horizontal dividing line Lhand vertical dividing line Lv and the outer frame of the transformingarea TA. As shown in FIG. 19, the dividing point D positioned on ahorizontal dividing line Lhi (i=1 or 2) is referred to as D0i, D1i, D2i,D3i, D4i and D5i in order from a left. For example, the dividing point Dpositioned on the horizontal dividing line Lh1 is referred to as D01,D11, D21, D31, D41 and D51. Similarly, the dividing point D positionedon a vertical dividing line Lvj (j=1, 2, 3 or 4) is referred to as Dj0,Dj1, Dj2 and Dj3 in order from the bottom. For example, the dividingpoint D positioned on the vertical dividing line Lv1 is referred to asD10, D11, D12 and D13.

As shown in FIG. 19, the arrangement of the dividing point D accordingto the example is symmetrical with respect to the reference line RL.

The transforming area dividing portion 250 divides the transforming areaTA into a plurality of small areas through straight lines connecting thearranged dividing points D (that is, the horizontal dividing line Lh andthe vertical dividing line Lv). In the example, the transforming area TAis divided into 15 small rectangular areas as shown in FIG. 19.

In the example, the arrangement of the dividing point D is determined bythe number and positions of the horizontal dividing lines Lh and thevertical dividing lines Lv. Therefore, it is also apparent that thedividing point arranging pattern table 410 defines the number andpositions of the horizontal dividing lines Lh and the vertical dividinglines Lv.

At Step S180 (FIG. 4), the transforming portion 260 (FIG. 1) carries outa processing of transforming an image which is intended for thetransforming area TA of the target image TI. The transformationprocessing is carried out through the transforming portion 260 by movingthe position of the dividing point D arranged in the transforming areaTA at the Step S170 to transform the small area.

A manner for moving the position of each of the dividing points D tocarry out the transformation processing (a moving direction and a movingdistance) is preset through the dividing point movement table 420(FIG. 1) corresponding to a combination of the transforming type and thetransforming degree which are set at the Step S120 (FIG. 4). Thetransforming portion 260 refers to the dividing point movement table420, thereby moving the position of the dividing point D in the movingdirection by the moving distance corresponding to the combination of thetransforming type and the transforming degree which are set at the StepS120.

In the example, as described above, the transforming “type A” forcausing the face to be sharp (see FIG. 5) is set as the transformingtype, and a degree of an extent “middle” is set as the transformingdegree. Therefore, the position of the dividing point D is moved in themoving direction by the moving distance corresponding to the combinationof the transforming type and the transforming degree.

FIG. 20 is an explanatory diagram showing an example of the contents ofthe dividing point movement table 420. Moreover, FIG. 21 is anexplanatory view showing an example of the movement of the position ofthe dividing point D in accordance with the dividing point movementtable 420. FIG. 20 shows a moving manner corresponding to thecombination of the transforming type for causing the face to be sharpand the transforming degree of the extent “middle” in the moving mannersof the position of the dividing point D which are defined based on thedividing point movement table 420. As shown in FIG. 20, the dividingpoint movement table 420 indicates a moving amount in an orthogonaldirection to the reference line RL (an H direction) and a paralleldirection with the reference line RL (a V direction) for each of thedividing points D. In the example, a unit of the moving amount shown inthe dividing point movement table 420 is a pixel pitch PP of the targetimage TI. Referring to the H direction, moreover, a rightward movingamount is represented as a positive value and a leftward moving amountis represented as a negative value. Referring to the V direction, anupward moving amount is represented as a positive value and a downwardmoving amount is represented as a negative value. For example, adividing point D11 is moved rightward in the H direction by a distancewhich is seven times as great as the pixel pitch PP and is moved upwardin the V direction by a distance which is 14 times as great as the pixelpitch PP. Since a dividing point D22 has a moving amount of zero in theH and V directions, for example, it is not moved.

In the example, it is assumed that a position of the dividing point IDpositioned on the outer frame of the transforming area TA (for example,a dividing point D10 shown in FIG. 21) is not moved in such a mannerthat a boundary between images on an inside and an outside of thetransforming area TA is not unnatural. Accordingly, a moving manner forthe dividing point D positioned on the outer frame of the transformingarea TA is not defined in the dividing point movement table 420 shown inFIG. 20.

In FIG. 21, the dividing point ID before the movement is shown in awhite circle, and the dividing point D after the movement and thedividing point D having no movement of a position are shown in a blackcircle. Moreover, the dividing point D after the movement is referred toas a dividing point D′. For example, the position of the dividing pointD11 is moved in a rightward upper direction of FIG. 21 so that adividing point D′11 is obtained.

In the example, the moving manner is defined in such a manner that allof combinations of the two dividing points ID having a symmetricalpositional relationship with respect to the reference line RL (acombination of the dividing points D11 and D41, for example) alsomaintain the symmetrical positional relationship with respect to thereference line RL after the movement of the dividing point D.

The transforming portion 260 carries out a processing of transforming animage in such a manner that an image of each small area constituting thetransforming area TA in a state set before the movement of the positionof the dividing point D is newly defined by the movement of the positionof the dividing point D. For example, in FIG. 21, an image of a smallarea using the dividing points D11, D21, D22 and D12 as apexes (a smallarea shown in hatching) is transformed into an image of a small areausing the dividing points D′11, D′21, D22 and D′12 as apexes.

FIG. 22 is an explanatory view showing a concept of a method oftransforming an image through the transforming portion 260. In FIG. 22,the dividing point D is shown in a black circle. In FIG. 22, forsimplicity of the description, a state set before the movement of theposition of the dividing point D and a state set after the movement ofthe position of the dividing point D are shown on left and right sidesrespectively for four small areas. In the example of FIG. 22, a centraldividing point Da is moved into a position of a dividing point Da′ andthe positions of the other dividing points are not moved. For example,consequently, an image of a small rectangular area (hereinafter referredto as a “before-trans formation noted small area BSA”) using thedividing points Da, Db, Dc and Dd before the movement of the dividingpoint D as apexes is transformed into an image of a small rectangulararea (hereinafter referred to as an “after-transformation noted smallarea ASA”) using the dividing points Da′, Db, Dc and Dd as apexes.

In the example, the small rectangular area is divided into fourtriangular areas by using a center of gravity CG of the small area and aprocessing of transforming an image is carried out on a unit of thetriangular area. In the example of FIG. 22, the before-transformation,noted small area BSA is divided into four triangular areas in which thecenter of gravity CG of the before-transformation noted small area BSAis set to be one of the apexes. Similarly, the after-transformationnoted small area ASA is divided into four triangular areas in which acenter of gravity CG′ of the after-transformation noted small area ASAis set to be one of the apexes. The processing of transforming an imageis carried out every triangular area corresponding to each of the statesbefore and after the movement of the dividing point Da. For example, animage of a triangular area using, as apexes, the dividing points Da andDd and the center of gravity CG in the before-transformation noted smallarea BSA is transformed into an image of a triangular area using, asapexes, the dividing points Da′ and Dd and the center of gravity CG′ inthe after-transformation noted small area ASA.

FIG. 23 is an explanatory view showing a concept of the method oftransforming an image in the triangular area. In the example of FIG. 23,an image of a triangular area stu using points s, t and u as apexes istransformed into an image of a triangular area s′t′u′ using points s′,t′ and u′ as apexes. The transformation of the image is carried out bycalculating a position in the image of the triangular area stu beforethe transformation to which a position of any of the images in thetriangular area s′t′u′ after the transformation corresponds and settinga pixel value in the image before the transformation in the calculatedposition to be a pixel value of the image obtained after thetransformation.

For example, in FIG. 23, it is assumed that a position of a noted pixelp′ in the image of the triangular area s′t′u′ obtained after thetransformation corresponds to a position p in the image of thetriangular area stu before the transformation. The calculation of thepoint p is carried out in the following manner. First of all, there arecalculated coefficients m1 and m2 for representing the position of thenoted pixel p′ as a sum of a vector s′t′ and a vector s′u′ as expressedin the following Equation (1).

{right arrow over (s′p′)}=m1·{right arrow over (s′t′)}+m2·{right arrowover (s′u′)}  [Equation 1]

By using the coefficients m1 and m2 thus calculated, next, a sum ofvectors st and su in the triangular area stu before the transformationis calculated by the following Equation (2) so that the position p isobtained.

{right arrow over (sp)}=m1·{right arrow over (st)}+m2·{right arrow over(su)}  [Equation 2]

In the case in which the position p in the triangular area stu beforethe transformation is coincident with a pixel center position of theimage which has not been transformed, a pixel value of the pixel is setto be a pixel value of the image obtained after the transformation. Onthe other hand, in the case in which the position p in the triangulararea stu which has not been transformed is shifted from the pixel centerposition of the image which has not been transformed, a pixel value inthe position p is calculated by an interpolating calculation such as abicubic using a pixel value of a pixel around the position p, and thepixel value thus calculated is set to be a pixel value of the imageobtained after the transformation.

By calculating the pixel value for each of the pixels in the image ofthe triangular area s′t′u′ obtained after the transformation asdescribed above, it is possible to carry out the image transformationprocessing from the image of the triangular area stu to that of thetriangular area s′t′u′. The transforming portion 260 defines thetriangular area to carry out the transformation processing as describedabove for each of the small areas constituting the transforming area TAshown in FIG. 21, and thus executes the image transformation processingin the transforming area TA.

A manner for correcting a face shape according to the example will bedescribed in more detail. FIG. 24 is an explanatory view showing themanner for correcting a face shape according to the example. In theexample, as described above, the transforming “type A” for causing theface to be sharp (see FIG. 5) is set as the transforming type, and thedegree of the extent “middle” is set as the transforming degree. FIG. 24shows, in an arrow, an image of a manner for transforming each of thesmall areas constituting the transforming area TA.

As shown in FIG. 24, in the correction of the face shape according tothe example, the position of the dividing point D (D11, D21, D31, D41)disposed on the horizontal dividing line Lh1 is moved upward, while theposition of the dividing point D (D12, D22, D32, D42) disposed on thehorizontal dividing line Lh2 is not moved with respect to the paralleldirection with the reference line RL (the V direction) (see FIG. 20).Accordingly, an image positioned between the horizontal dividing linesLh1 and Lh2 is reduced with respect to the V direction. As describedabove, the horizontal dividing line Lh1 is disposed below the image ofthe chin and the horizontal dividing line Lh2 is disposed in thevicinity of the just lower part of the image of the eye. In the faceshape correction according to the example, therefore, an image of aportion from the chin to the lower part of the eye in the image of theface is reduced in the V direction. As a result, a line of the chin inthe image is moved upward.

On the other hand, referring to the orthogonal direction to thereference line RL (the H direction), the position of the dividing pointD (D11, D12) disposed on the vertical dividing line Lv1 is moved in arightward direction and the position of the dividing point D (D41, D42)disposed on the vertical dividing line Lv4 is moved in a leftwarddirection (see FIG. 20). Furthermore, the position of the dividing pointD (D21) disposed on the horizontal dividing line Lh1 in the two dividingpoints D disposed on the vertical dividing line Lv2 is moved in arightward direction and the position of the dividing point D (D31)disposed on the horizontal dividing line Lh1 in the two dividing pointsD disposed on the vertical dividing line Lv3 is moved in a leftwarddirection (see FIG. 20). Accordingly, an image positioned on a left sideof the vertical dividing line Lv1 is enlarged rightward with respect tothe H direction and an image positioned on a right side of the verticaldividing line Lv4 is enlarged leftward. Moreover, an image positionedbetween the vertical dividing lines Lv1 and Lv2 is reduced or movedrightward with respect to the H direction, and an image positionedbetween the vertical dividing lines Lv3 and Lv4 is reduced or movedleftward with respect to the H direction. Furthermore, an imagepositioned between the vertical dividing lines Lv2 and Lv3 is reducedwith respect to the H direction around the position of the horizontaldividing line Lh1.

As described above, the vertical dividing lines Lv1 and Lv4 are disposedon an outside of the image of the cheek line and the vertical dividinglines Lv2 and Lv3 are disposed on an outside of the images of thecorners of the eyes. In the face shape correction according to theexample, therefore, images in outside parts of the corners of both eyesin the image of the face are wholly reduced in the H direction. Inparticular, a reduction ratio is increased in the vicinity of the chin.As a result, the shape of the face in the image is wholly thinned in thetransverse direction.

When the transforming manners in the H and V directions are integrated,the shape of the face in the target image TI is made sharp through theface shape correction according to the example. The sharpness of theface shape can also be expressed to be a so-called “small face”.

Small areas (shown in hatching) using the dividing points D22, D32, D33and D23 as apexes shown in FIG. 24 include the images of both eyesaccording to the method of arranging the horizontal dividing line Lh2and the vertical dividing lines Lv2 and Lv3. As shown in FIG. 20, thedividing points D22 and D32 are moved in neither the H direction nor theV direction. Therefore, the small area including the images of both eyesis not transformed. According to the example, thus, it is assumed thatthe small area including the images of both eyes is not transformed andthe image obtained after correcting the face shape is more natural andpreferable.

At Step S190 (FIG. 4), the face shape correcting portion 200 (FIG. 1)gives the displaying portion 310 an instruction for displaying, on thedisplay portion 150, the target image TI obtained after correcting theface shape. FIG. 25 is an explanatory view showing an example of a stateof the display portion 150 on which the target image TI obtained aftercorrecting the face shape is displayed. By the display portion 150 onwhich the target image TI obtained after correcting the face shape isdisplayed, a user can confirm a result of the correction. In the case inwhich the user does not satisfy the result of the correction but selectsa “return” button, a screen for selecting the transforming type and thetransforming degree shown in FIG. 5 is displayed on the display portion150, for example, and the transforming type and the transforming degreeare reset by the user. In the case in which the user satisfies theresult of the correction and selects a “print” button, the followingcorrected image print processing is started.

At Step S200 (FIG. 3), the printing portion 320 (FIG. 1) controls theprinter engine 160 and prints the target image TI obtained after theface shape correction processing. FIG. 26 is a flowchart showing a flowof the corrected image print processing according to the example. Theprinting portion 320 converts a resolution of image data of the targetimage TI obtained after the face shape correction processing into aresolution which is suitable for the print processing to be carried outby the printer engine 160 (Step S210) and converts image data obtainedafter converting the resolution into ink color image data represented ina gradation through a plurality of ink colors to be used for the printin the printer engine 160 (Step S220). In the example, it is assumedthat a plurality of ink colors to be used for the print in the printerengine 160 includes four colors, that is, cyan (C), magenta (M), yellow(Y) and black (K). Furthermore, the printing portion 320 executes ahalftone processing based on a gradation value of each of the ink colorsin the ink color image data, thereby generating dot data indicative of aformation state of an ink dot every print pixel (Step S230) andarranging the dot data to generate print data (Step S240). The printingportion 320 supplies the generated print data to the printer engine 160and causes the printer engine 160 to print the target image TI (StepS250). Consequently, the target image TI obtained after correcting theface shape is printed completely.

A-3. Variant of First Example

In the first example, the description has been given to the face shapecorrection processing in the case in which the transforming “type A”(see FIG. 5) for causing the face to be sharp is set as the transformingtype and the degree of the extent “middle” is set as the transformingdegree. In the case in which these setting operations are different fromeach other, different face shape correction print processings areexecuted.

As described above, the manner for moving the position of the dividingpoint D for the transformation processing (the moving direction and themoving distance) is determined corresponding to the combination of thetransforming type and the transforming degree through the dividing pointmovement table 420 (FIG. 1). Accordingly, in the case in which an extent“large” is set in place of the extent “middle” as the transformingdegree, for example, the dividing point D is moved in the moving mannercorresponding to the extent “large” which is determined in the dividingpoint movement table 420.

FIG. 27 is an explanatory diagram showing another example of thecontents of the dividing point movement table 420. FIG. 27 shows amanner for moving the position of the dividing point D corresponding toa combination of a transforming type for causing the face to be sharpand a transforming degree of the extent “large”. In the moving mannershown in FIG. 27, values of moving distances in H and V directions aregreater as compared with the moving manner corresponding to thecombination of the transforming type for causing the face to be sharp asshown in FIG. 20 and the transforming degree of the extent “middle”. Inthe case in which the extent “large” is set as the transforming degree,accordingly, there is increased a transforming amount in any of thesmall areas constituting the transforming area TA which is to betransformed. As a result, the shape of the face in the target image TIis made sharper.

As described above, moreover, the manner for arranging the dividingpoint D in the transforming area TA (the number and the positions of thedividing points D) is defined corresponding to the set transforming typethrough the dividing point arranging pattern table 410 (FIG. 1).Accordingly, in the case in which a transforming “type B” for enlargingan eye (see FIG. 5) is set in place of the transforming type for causingthe face to be sharp as the transforming type, for example, the dividingpoint D is arranged in a manner corresponding to the transforming typefor enlarging the eye.

FIG. 28 is an explanatory view showing an example of another method ofarranging the dividing point D. FIG. 28 shows a manner for arranging thedividing point D corresponding to the transforming type to enlarge theeye. In the arrangement of the dividing point D shown in FIG. 28, sixdividing points D (D04, D14, D24, D34, D44, D54) positioned on ahorizontal dividing line Lh4 are added as compared with the mannercorresponding to the transforming type for causing the face to be sharpas shown in FIG. 19. The horizontal dividing line Lh4 is disposed in thevicinity of a just upper part of the image of the eye.

FIG. 29 is an explanatory diagram showing a further example of thecontents of the dividing point movement table 420. FIG. 29 shows amanner for moving the position of the dividing point D corresponding toa combination of the transforming type for enlarging the eye and thetransforming degree of the extent “middle”. FIG. 29 shows a movingmanner related to only the dividing points D on the horizontal dividinglines Lh2 and Lh4 (FIG. 28) which is extracted. It is assumed that anyof the dividing points D other than the dividing points D shown in FIG.29 is not moved.

When the dividing point D is moved in the manner shown in FIG. 29, animage of a small rectangular area (shown in hatching of FIG. 28) usingthe dividing points D22, D32, D34 and D24 as apexes is enlarged in aparallel direction with the reference line RL. Accordingly, the shape ofthe eye in the target image TI is enlarged vertically.

As described above, in the example, in the case in which a request isgiven through the user interface shown in FIG. 5, the details of thetransforming manner are designated by the user. In this case, the movingmanner of the dividing point D is designated by the user after thearrangement of the dividing point D in accordance with a patterncorresponding to a transforming type which is set (the Step S170 in FIG.4).

FIG. 30 is an explanatory view showing an example of the user interfacefor designating the manner for moving the dividing point D through theuser. In the case in which the request for designating the details ofthe transforming manner is given by the user, the designation acquiringportion 212 of the printer 100 (FIG. 1) gives the displaying portion 310an instruction for displaying, on the display portion 150, the userinterface shown in FIG. 30 after the arrangement of the dividing point Dis completed. In the user interface shown in FIG. 30, an imageindicative of the arrangement of the dividing point D on thetransforming area TA of the target image TI is displayed on a left sideand the interface for designating the manner for moving the dividingpoint D is disposed on a right side. The user can optionally designatemoving amounts in the H and V directions for each of the dividing pointsD through the user interface. The transforming portion 260 (FIG. 1)carries out the transformation processing by moving the dividing point Din the moving manner designated through the user interface.

In the user interface shown in FIG. 30, a moving amount of a default ineach of the H and V directions for each of the dividing points D isdetermined depending on the set transforming type (for example, atransforming type for causing the face to be sharp) in an initialcondition and the user modifies a moving amount for a desirable one ofthe dividing points D. Thus, the user can finely regulate and designatethe moving amount while referring to the moving amount of the default.Thus, it is possible to implement an image transformation processing offinely regulating an image transformation of a desirable transformingtype.

As described above, in the face shape correction print processing to becarried out by the printer 100 according to the example, a plurality ofdividing points D is arranged in the transforming area TA set onto thetarget image TI, and the transforming area TA is divided into aplurality of small areas by using the straight lines for connecting thedividing points D (the horizontal dividing line Lh and the verticaldividing line Lv). Moreover, there is executed the processing oftransforming an image in the transforming area TA by moving the positionof the dividing point D and transforming the small area. In the faceshape correction print processing to be carried out by the printer 100according to the example, thus, it is possible to transform an image bysimply arranging the dividing point D in the transforming area TA andmoving the dividing point D thus arranged. Thus, the transformation ofthe image corresponding to various transforming manners can beimplemented easily and efficiently.

In the face shape correction print processing to be carried out by theprinter 100 according to the example, moreover, the dividing point D isarranged in accordance with the arranging pattern corresponding to anyof the transforming types which is selected and set. For this reason,there is carried out the arrangement of the dividing point D, that is,the division of the transforming area TA which is suitable forrespective transforming types, for example, the transforming type forcausing the face to be sharp and the transforming type for enlarging theeye. Thus, it is possible to implement the image transformation of eachof the transforming types more easily.

In the face shape correction print processing to be carried out by theprinter 100 according to the example, moreover, the dividing point D ismoved in the moving manner (the moving direction and the moving amount)corresponding to the combination of the transforming type and thetransforming degree which are selected and set. If the transforming typeand the transforming degree are set, therefore, the image transformationis executed depending on their combination. Thus, the imagetransformation can be implemented more easily.

In the face shape correction print processing to be carried out by theprinter 100 according to the example, moreover, the arrangement of thedividing point D in the transforming area TA is symmetrical with respectto the reference line RL, and the moving manner of the dividing point Dis determined in such a manner that all of the combinations of twodividing points D having a symmetrical positional relationship withrespect to the reference line RL maintain the symmetrical positionalrelationship with respect to the reference line RL after the movement ofthe dividing point D. In the face shape correction print processingaccording to the example, therefore, the symmetrical imagetransformation with respect to the reference line RL is carried out.Consequently, it is possible to implement the image transformation ofthe face image which is more natural and preferable.

In the face shape correction print processing to be carried out by theprinter 100 according to the example, furthermore, it is possible toprevent the transformation from being carried out for a part of thesmall areas constituting the transforming area TA. More specifically, asshown in FIG. 24, it is possible to set the arrangement and movingmanner of the dividing point D in such a manner that the transformationis not carried out for the small areas including the images of botheyes. By preventing the transformation from being carried out for thesmall areas including the images of both eyes, thus, it is possible toimplement the image transformation of the face image which is morenatural and preferable.

In the face shape correction print processing to be carried out by theprinter 100 according to the example, moreover, in the case in which arequest for designating the details of the transforming manner is givenby the user, the moving amounts in the H and V directions are designatedfor each of the dividing points D through the user interface and theposition of the dividing point D is moved in accordance with thedesignation. Therefore, it is possible to easily implement the imagetransformation in a closer manner to the request of the user.

In the face shape correction print processing to be carried out by theprinter 100 according to the example, furthermore, the positioning inthe vertical direction of the face area FA which is detected is executed(the Step S140 in FIG. 4) before setting the transforming area TA (theStep S160 in FIG. 4). Therefore, a more adapted face area FA can be setinto the position of the image of the face in the target image TI, andthe result of the image transformation processing in the transformingarea TA set based on the face area FA can be made more preferable.

Moreover, the positioning of the face area FA according to the exampleis executed by referring to the position along the reference line RL ofthe image of the eye to be a reference object. In the example, anevaluation value representing a feature of the distribution of the pixelvalue in the orthogonal direction to the reference line RL is calculatedfor a plurality of evaluating positions along the reference line RL inthe specific area SA set as the area including the image of the eye.Therefore, it is possible to detect a position along the reference lineRL of the image of the eye based on the evaluation value thuscalculated.

More specifically, it is possible to detect the position of the image ofthe eye by selecting the evaluating target pixel TP for each of thetarget pixel specifying lines PL which are orthogonal to the referenceline RL and using, as the evaluation value, the mean value of the Rvalue of the evaluating target pixel TP.

Moreover, the position of the image of the eye is detected individuallyfor the left dividing specific area SA(l) and the right dividingspecific area SA(r) which are set to include an image of one of theeyes, respectively. As compared with the case in which the position ofthe image of the eye is detected by setting the whole specific area SAas a target, therefore, it is possible to eliminate the influence of apositional shift along the reference line RL for left and right eyes,thereby enhancing precision in the detection.

In the calculation of the evaluation value for detecting the position ofthe image of the eye, furthermore, it is assumed that a part of theselected evaluating target pixels TP which has a great R value isexcluded from the calculating target of the evaluation value for each ofthe target pixel specifying lines PL. By excluding, from the calculatingtarget of the evaluation value, a part of the evaluating target pixelsTP which is supposed to have a great difference in a color from theimage of the eye to be the reference object, therefore, it is possibleto enhance precision in the detection of the position of the image ofthe eye more greatly.

In the face shape correction print processing to be carried out by theprinter 100 according to the example, moreover, the regulation of thetilt of the face area FA is executed (the Step S150 in FIG. 4) beforesetting the transforming area TA (the Step S160 in FIG. 4). Therefore, amore adapted face area FA can be set to the tilt of the image of theface in the target image TI, and a result of the image transformationprocessing in the transforming area TA set based on the face area FA canbe made more preferable.

In addition, the regulation of the tilt of the face area FA according tothe example is executed by referring to the tilt of the images of botheyes to be the reference objects. In the example, the area including theimages of both eyes is set to be the evaluating specific area ESAcorresponding to each of the evaluating direction lines EL obtained byrotating the reference line RL at various angles. In each of theevaluating specific areas ESA, the evaluation value representing thefeature of the distribution of the pixel value in the orthogonaldirection to the evaluating direction is calculated for the evaluatingpositions in the evaluating direction. Based on the evaluation valuethus calculated, therefore, it is possible to detect the tilt of theimages of both eyes.

More specifically, referring to each of the evaluating specific areasESA, by selecting the evaluating target pixel TP for the target pixelspecifying lines PL which are orthogonal to the evaluating directionline EL, calculating the mean value of the R value of the evaluatingtarget pixel TP as the evaluation value and determining an evaluatingdirection in which a variance of the evaluation value is a maximum, itis possible to detect the tilt of the images of both eyes.

In the calculation of the evaluation value for detecting the tilt of theimages of both eyes, moreover, it is assumed that a part of the selectedevaluating target pixels TP which has a great R value is excluded fromthe calculating target of the evaluation value for each of the targetpixel specifying lines PL. By excluding a part of the evaluating targetpixels TP which is supposed to have a greater difference in a color fromthe images of both eyes to be the reference objects from the calculatingtarget of the evaluation value, therefore, it is possible to enhance theprecision in the detection of the tilt of the images of both eyes moregreatly.

In the face shape correction print processing to be carried out by theprinter 100 according to the example, furthermore, a plurality of smallareas constituting the transforming area TA is divided into fourtriangular areas and the image transformation processing is carried outon a unit of the triangular area. At this time, the division of thesmall area into four triangles is carried out by using a segmentconnecting each of the apexes of the small area to the center of gravityCG (CG′) before and after the transformation, respectively. The positionof the center of gravity of the small area can be calculated fromcoordinates of the four apexes. As compared with the case in which thetransforming area TA is divided into the small triangular areas from thebeginning, therefore, it is possible to decrease the number of thecoordinates to be designated, thereby increasing a speed of theprocessing. In the case in which the image is transformed without thedivision of the small area into the triangles, moreover, there is apossibility that the small area might take a shape having an interiorangle exceeding 180 degrees, resulting in a hindrance to thetransformation processing depending on the moving direction and amountof each of the apexes (the dividing points D) of the small area. In theexample, the transformation processing is carried out through thedivision of the small area into the triangles. Therefore, it is possibleto prevent the drawback from being generated and to carry out theprocessing smoothly and stably.

B. Other Variants

The invention is not restricted to the examples and the embodiment butcan be carried out in various manners without departing from the scopethereof and the following transformation can also be performed, forexample.

B1. Other Variant 1:

While the mean value of the R value for each of the target pixelspecifying lines PL is used as the evaluation value in the positioningor tilt regulation of the face area FA in the example (see FIGS. 9 and15), it is also possible to employ, as the evaluation value, othervalues representing the distribution of the pixel value in the directionof the target pixel specifying line PL (that is, the orthogonaldirection to the reference line RL). For example, it is also possible touse a mean value of a luminance value or an edge amount. It can besupposed that the portion of the image of the eye to be the referenceobject has a luminance value or an edge amount which is greatlydifferent from that of the image of a surrounding skin portion.Therefore, the values can also be used as the evaluation values.

For the values, moreover, it is also possible to use the number ofpixels having a cumulative value or a value which is equal to or smallerthan (or is equal to or greater than) a threshold in place of a meanvalue of the pixel to be the evaluating value calculating target. Forexample, it is also possible to use, as the evaluation value, thecumulative value of the R value for each of the target pixel specifyinglines PL or the number of pixels having an R value which is equal to orsmaller than a threshold. Although a part of the evaluating targetpixels TP is not used for calculating the evaluation value for each ofthe target pixel specifying lines PL in the example, moreover, all ofthe evaluating target pixels TP may be used to calculate the evaluationvalue.

Although the mean value of the R value is used as the evaluation valueon the premise that the Mongoloid is a target in the example,furthermore, other evaluation values (for example, a luminance, abrightness and a B value) may be used in the case in which another race(a white race or a black race) is intended.

B2. Other Variant 2:

In the example, in the positioning or tilt regulation of the face areaFA, n target pixel specifying lines PL are set to the specific area SAor the evaluating specific area ESA, and the evaluation value iscalculated in the position of the target pixel specifying line PL (seeFIGS. 9 and 15). However, the set number of the target pixel specifyinglines PL does not need to be fixed to n but may be variably setaccording to the size of the specific area SA or the evaluating specificarea ESA for the target image TI. For example, the pitch s of the targetpixel specifying line PL may be fixed and the number of the target pixelspecifying lines PL may be set depending on the size of the specificarea SA or the evaluating specific area ESA.

B3. Other Variant 3:

While the evaluating direction is set within a range of 20 degreesclockwise and counterclockwise around the direction of the referenceline RL in the regulation of the tilt of the face area FA in the example(see FIG. 15), it is also possible to set the evaluating directionwithin a range of 20 degrees clockwise and counterclockwise around thedirection of the approximate tilt angle RI which is calculated in thepositioning of the face area FA.

Although the evaluating direction is set at the pitch of the certainangle α in example, moreover, the pitches of the evaluating directionsdo not need to be constant. For example, it is also possible to reducethe pitch and to thus set the evaluating direction within a close rangeto the direction of the reference line RL, and to increase the pitch andto thus set the evaluating direction within a distant range from thereference line RL.

Although the specific area SA corresponding to the face area FAsubjected to the positioning is set to be the initial evaluatingspecific area ESA(0) in the regulation of the tilt of the face area FAin the example, furthermore, the initial evaluating specific area ESA(0)may be set independently of the specific area SA.

B4. Other Variant 4:

In the example, in the regulation of the tilt of the face area FA, theevaluating directions are set and the evaluating specific area ESAcorresponding to the evaluating direction line EL representing each ofthe evaluating directions is set. The evaluating specific area ESA isobtained by rotating the initial evaluating specific area ESA(0) at anequal angle to the rotating angle from the reference line RL of theevaluating direction line EL (see FIG. 15). However, the evaluatingspecific area ESA does not need to be always set as the same area. Forexample, all of the evaluating specific areas ESA corresponding to theevaluating direction lines EL may be set to be the same areas as theinitial evaluating specific area ESA(0). Also in this case, it ispreferable to calculate the mean value of the R value to be theevaluation value in the same manner for the target pixel specifying linePL which is orthogonal to the evaluating direction line EL. Also in thiscase, it is possible to implement the regulation of the tilt of the facearea FA which is adapted to the tilt of the image by selecting theevaluating direction in which the variance of the evaluation value takesa maximum value.

B5. Other Variant 5:

In the example, in the positioning and tilt regulation of the face areaFA, the position and tilt of the image of the eye to be the referenceobject is detected. By using the position and the tilt which are thusdetected, the positioning and tilt regulation of the face area FA isexecuted. However, another image, for example, an image of a nose or amouth may be used as the reference object.

Moreover, the detection of the position and tilt of the image of thereference object according to the example is not restricted to the casein which the positioning and tilt regulation of the face area FA isintended but can be widely applied to the case in which the position andtilt of the image of the reference object in the target image TI isdetected. In this case, the reference object is not restricted to theface portion but an optional object can be employed as the referenceobject.

B6. Other Variant 6:

Although the transforming area TA (see FIG. 18) is set to take theoblong shape in the example, the transforming area TA may be set to takeanother shape, for example, an elliptical shape or a rhombic shape.

Moreover, the method of dividing the transforming area TA into smallareas according to the example (see FIGS. 19 and 28) is onlyillustrative and other dividing methods can also be employed. Forexample, the arrangement of the dividing point D in the transformingarea TA can be optionally changed. Furthermore, the small area does notneed to take the oblong shape but may take a rectangular shape or apolygonal shape. In addition, it is preferable that the arrangement ofthe dividing point D in the transforming area TA should be carried outin accordance with a user designation.

B7. Other Variant 7:

In the example, a part of the transforming area TA is protruded from thetarget image TI in some cases. In those cases, a part of the dividingpoint D cannot be disposed on the target image TI. In the case in whicha part of the dividing points D cannot be disposed on the target imageTI, the horizontal dividing line Lh and the vertical dividing line Lvfor defining the position of the dividing point D (see FIG. 19) may bedeleted and only the dividing points D defined by the residualhorizontal dividing line Lh and vertical dividing line Lv may be used toexecute the division of the transforming area TA into the small areas.In the case in which a part of the dividing points D cannot be disposedon the target image TI, alternatively, the face shape correction doesnot need to be executed.

B8. Other Variant 8:

In the example, the contents of the face shape correction printprocessing (FIG. 3) are only illustrative and the order of each step maybe changed or the execution of apart of the steps may be omitted. Forexample, the resolution conversion or the color conversion in the printprocessing (the Step S210 or S220 in FIG. 26) may be executed before theface shape correction (the Step S100 in FIG. 3).

Moreover, the order of the positioning of the face area FA (the StepS140 in FIG. 4) and the regulation of the tilt of the face area FA (theStep S150 in FIG. 4) may be reversed. In addition, it is also possibleto execute only one of the processings and to omit the other processing.Furthermore, it is also possible to set the transforming area TA (theStep S160 in FIG. 4) immediately after the detection of the face area FA(the Step S130 in FIG. 4) and to carry out the same poisoning and tiltregulation by setting the set transforming area TA to be a target. Alsoin this case, the transforming area TA includes at least the image of apart of the face. Therefore, it is possible to carry out the positioningand tilt regulation of the area including the image of the face.

While the detection of the face area FA (the Step S130 in FIG. 4) isexecuted in the example, moreover, it is also possible to acquireinformation about the face area FA through a user designation in placeof the detection of the face area FA, for example.

B9. Other Variant 9:

While the description has been given to the face shape correction printprocessing (FIG. 3) to be carried out by the printer 100 serving as theimage processing apparatus in the example, the face shape correction(the Step S100 in FIG. 3) may be executed by means of a personalcomputer and only the print processing (Step S200) may be executed bymeans of a printer in the face shape correction print processing, forexample. Moreover, the printer 100 is not restricted to an ink jetprinter but printers using other methods, for example, a laser printeror a sublimatic printer may be employed.

B10. Other Variant 10:

In the example, a part of the structure implemented in hardware may bereplaced with software. To the contrary, a part of the structureimplemented in the software may be replaced with the hardware.

According to an aspect of the invention, a plurality of dividing pointsis arranged in the transforming area set onto the target image and thetransforming area is divided into a plurality of small areas by usingthe straight line connecting the dividing points. Moreover, the positionof the dividing point is moved and the small area is transformed so thatthe processing of transforming the image in the transforming area isexecuted. Thus, the dividing point is arranged in the transforming areaand the arranged dividing point is simply moved so that the image can betransformed. Thus, the image processing of transforming an imagecorresponding to various transforming manners can be implemented easilyand efficiently.

The image processing apparatus may further include a transforming mannersetting portion for selecting one of a plurality of predeterminedtransforming types and setting the type as a transforming type to beapplied to a transformation of an image in the transforming area. Thetransforming area dividing portion may arrange the dividing points inaccordance with a predetermined arranging pattern corresponding to theset transforming type.

Thus, the arrangement of the dividing points, that is, the division ofthe transforming area which is suitable for respective transformingtypes such as a transforming type for causing a face to be sharp and atransforming type for enlarging eyes is carried out. Therefore, it ispossible to implement a further easiness of the image processing fortransforming an image corresponding to each of the transforming types.

Moreover, the transforming manner setting portion may select one of aplurality of predetermined transforming degrees and may set thetransforming degree as a transforming degree to be applied to atransformation of an image in the transforming area. The transformingportion may move a position of the dividing point in accordance with apredetermined moving direction and moving amount corresponding to acombination of the transforming type and the transforming degree whichare set.

If the transforming type and the transforming degree are set, thus, theimage transformation corresponding to their combination is executed.Therefore, it is possible to implement a further easiness of the imageprocessing for transforming an image.

Furthermore, the transforming manner setting portion may include adesignation acquiring portion for acquiring a user designation relatedto a moving direction and a moving amount of the dividing point for atleast one of the dividing points. The transforming portion may move aposition of the dividing point in accordance with the acquired userdesignation.

Thus, it is possible to easily implement the image processing fortransforming an image in a manner which is closer to a demand of a user.

Moreover, the transforming area setting portion may set the transformingarea in such a manner that at least a part of an image of a face isincluded in the transforming area.

Consequently, it is possible to easily and efficiently implement theimage processing for transforming an image corresponding to varioustransforming manners with an image of a face set to be a target.

Furthermore, the transforming area dividing portion may arrange thedividing points in such a manner that at least one pair of dividingpoints is mutually arranged in symmetrical positions with respect to apredetermined reference line. The transforming portion may move the atleast one pair of dividing points while maintaining a positionalrelationship in which they are mutually symmetrical with respect to thepredetermined reference line.

Thus, the symmetrical image transformation with respect to thepredetermined reference line is carried out. Consequently, it ispossible to implement an image processing for transforming an image of aface which is more natural and preferable.

Moreover, the transforming portion may not carry out the transformationfor at least one of the small areas.

Consequently, it is possible to carry out a desirable imagetransformation without greatly changing an impression of a face. Thus,it is possible to implement an image processing for transforming a faceimage which is more natural and preferable.

Furthermore, the transforming portion may not carry out thetransformation for the small areas including an image of an eye.

Thus, the small area including the image of the eye is not transformed.Consequently, it is possible to implement an image processing fortransforming a face image which is more natural and preferable.

In addition, the image processing apparatus may further include a facearea detecting portion for detecting a face area representing an imageof a face on the target image. The transforming area setting portion mayset the transforming area based on the face area thus detected.

For the image transformation in the transforming area set based on theface area detected from the target image, thus, it is possible to easilyand efficiently implement the image processing for transforming an imagecorresponding to various transforming manners.

Moreover, the image processing apparatus may further include a printingportion for printing the target image subjected to a transformation ofan image in the transforming area.

Thus, it is possible to easily and efficiently print an image obtainedafter the image transformation corresponding to various transformingmanners.

The invention can be implemented in various manners, for example, animage processing method and apparatus, an image transforming method andapparatus, an image correcting method and apparatus, a computer programfor implementing functions of the methods or apparatuses, a recordingmedium recording the computer program thereon, and a data signalincluding the computer program and materialized in a carrier.

1-12. (canceled)
 13. An apparatus comprising: a detecting unitconfigured to detect a face in an image; and a processing unitconfigured to perform a transforming process to a predetermined areathat includes at least a part of the face, wherein the processing unitperforms the transforming process when the predetermined area isdisposed inside of the image, and the processing unit does not performthe transforming process when at least a part of the predetermined areais disposed outside of the image.
 14. The apparatus according to claim13, further comprising: a transforming area dividing unit configured toarrange a plurality of dividing points in the predetermined area todivide the transforming area into a plurality of small areas by a lineconnecting the dividing points; and a transforming manner setting unitconfigured to select one of a plurality of predetermined transformingtypes to set the one of the predetermined transforming types as atransforming type to be used for transforming an image in thetransforming area, wherein the transforming area dividing unit arrangesthe dividing points in accordance with a predetermined arranging patterncorresponding to the set transforming type, and the processing unitmoves a position of at least one of the dividing points to perform thetransforming process to the predetermined area.
 15. An apparatuscomprising: a detecting unit configured to detect a face in an image;and a processing unit configured to perform a transforming process to apredetermined area that includes at least a part of the face, whereinthe processing unit performs the transforming process when thepredetermined area can be set on the image, and the processing unit doesnot perform the transforming process when the predetermined area cannotbe set on the image.
 16. The apparatus according to claim 15, furthercomprising: a transforming area dividing unit configured to arrange aplurality of dividing points in the predetermined area to divide thetransforming area into a plurality of small areas by a line connectingthe dividing points; and a transforming manner setting unit configuredto select one of a plurality of predetermined transforming types to setthe one of the predetermined transforming types as a transforming typeto be used for transforming an image in the transforming area, whereinthe transforming area dividing unit arranges the dividing points inaccordance with a predetermined arranging pattern corresponding to theset transforming type, and the processing unit moves a position of atleast one of the dividing points to perform the transforming process tothe predetermined area.
 17. A method comprising: a detecting step fordetecting a face in an image; and a processing step for performing atransforming process to a predetermined area that includes at least apart of the face, wherein in the processing step, the transformingprocess is performed when the predetermined area is disposed inside ofthe image, and in the processing step, the transforming process is notperformed when at least a part of the predetermined area is disposedoutside of the image.
 18. The method according to claim 17, furthercomprising: a transforming area dividing step for arranging a pluralityof dividing points in the predetermined area to divide the transformingarea into a plurality of small areas by a line connecting the dividingpoints; and a transforming manner setting step for selecting one of aplurality of predetermined transforming types to set the one of thepredetermined transforming types as a transforming type to be used fortransforming an image in the transforming area, wherein in thetransforming area dividing step, the dividing points are arranged inaccordance with a predetermined arranging pattern corresponding to theset transforming type, and in the processing step, a position of atleast one of the dividing points is moved to perform the transformingprocess to the predetermined area.
 19. A method comprising: a detectingstep for detecting a face in an image; and a processing step forperforming a transforming process to a predetermined area that includesat least a part of the face, wherein in the processing step, thetransforming process is performed when the predetermined area can be seton the image, and in the processing step, the transforming process isnot performed when the predetermined area cannot be set on the image.20. The method according to claim 19, further comprising: a transformingarea dividing step for arranging a plurality of dividing points in thepredetermined area to divide the transforming area into a plurality ofsmall areas by a line connecting the dividing points; and a transformingmanner setting step for selecting one of a plurality of predeterminedtransforming types to set the one of the predetermined transformingtypes as a transforming type to be used for transforming an image in thetransforming area, wherein in the transforming area dividing step, thedividing points are arranged in accordance with a predeterminedarranging pattern corresponding to the set transforming type, and in theprocessing step, a position of at least one of the dividing points ismoved to perform the transforming process to the predetermined area. 21.A non-transitory computer-readable recording medium in which a computerprogram causing a computer to execute a method is stored, the methodcomprising: a detecting step for detecting a face in an image; and aprocessing step for performing a transforming process to a predeterminedarea that includes at least a part of the face, wherein in theprocessing step, the transforming process is performed when thepredetermined area is disposed inside of the image, and in theprocessing step, the transforming process is not performed when at leasta part of the predetermined area is disposed outside of the image. 22.The non-transitory computer-readable recording medium according to claim21, the method further comprising: a transforming area dividing step forarranging a plurality of dividing points in the predetermined area todivide the transforming area into a plurality of small areas by a lineconnecting the dividing points; and a transforming manner setting stepfor selecting one of a plurality of predetermined transforming types toset the one of the predetermined transforming types as a transformingtype to be used for transforming an image in the transforming area,wherein in the transforming area dividing step, the dividing points arearranged in accordance with a predetermined arranging patterncorresponding to the set transforming type, and in the processing step,a position of at least one of the dividing points is moved to performthe transforming process to the predetermined area.
 23. A non-transitorycomputer-readable recording medium in which a computer program causing acomputer to execute a method is stored, the method comprising: adetecting step for detecting a face in an image; and a processing stepfor performing a transforming process to a predetermined area thatincludes at least a part of the face, wherein in the processing step,the transforming process is performed when the predetermined area can beset on the image, and in the processing step, the transforming processis not performed when the predetermined area cannot be set on the image.24. The non-transitory computer-readable recording medium according toclaim 23, the method further comprising: a transforming area dividingstep for arranging a plurality of dividing points in the predeterminedarea to divide the transforming area into a plurality of small areas bya line connecting the dividing points; and a transforming manner settingstep for selecting one of a plurality of predetermined transformingtypes to set the one of the predetermined transforming types as atransforming type to be used for transforming an image in thetransforming area, wherein in the transforming area dividing step, thedividing points are arranged in accordance with a predeterminedarranging pattern corresponding to the set transforming type, and in theprocessing step, a position of at least one of the dividing points ismoved to perform the transforming process to the predetermined area.